package org.dyz.banana.platform.common.service.impl;

import org.dyz.banana.platform.common.vo.TPermissionVo;
import org.dyz.banana.platform.common.vo.TUserVo;

import java.util.Set;

import org.dyz.banana.platform.common.mapper.TUserMapper;
import org.dyz.banana.platform.common.service.ITUserService;

import com.baomidou.mybatisplus.core.conditions.query.QueryWrapper;
import com.baomidou.mybatisplus.extension.service.impl.ServiceImpl;

import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;

/**
 * <p>
 * 用户表 服务实现类
 * </p>
 *
 * @author dongyongzhao
 * @since 2021-04-12
 */
@Service
public class TUserServiceImpl extends ServiceImpl<TUserMapper, TUserVo> implements ITUserService {

	@Autowired
	public TUserMapper tUserMapper;
	
	public TUserVo findByUsername(String username) {
		QueryWrapper<TUserVo> queryWrapper = new QueryWrapper<TUserVo>();
		queryWrapper.eq("user_name", username);
		queryWrapper.eq("defun_ind", "0");
		return tUserMapper.selectOne(queryWrapper);
	}

	public Set<TPermissionVo> findPermissions(String username) {
		return null;
	}

}
